@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="peopleInfoForm">

            <div class="row">
                <input type="hidden" id="orgId" value="${people.orgId}">
                <input type="hidden" id="id" value="${people.id}">
                <input type="hidden" id="uploadUrl" value="${uploadUrl}">
                <div class="col-sm-6 b-r">
                    <#input id="orgName" name="所属学校" value="${people.orgName}" underline="true" disabled="disabled"/>
                <#input id="cellphone" name="手机" underline="true" value="${people.cellphone}" span="true"/>
                <#select id="papersType" name="证件类型" underline="true">
                @for(papersType in GBPapersType){
                <option value="${papersType.code}" ${papersType.code==people.papersType?'selected':""}>${papersType.cname}</option>
                @}
            </#select>
            <#input id="nativePlace" name="籍贯" underline="true"  value="${people.nativePlace}"/>
            <#input id="birthday" name="出生日期" underline="true" value="${people.birthday}"/>
            <#input id="telephone" name="联系电话" underline="true" value="${people.telephone}"/>
            <#input id="postCode" name="邮编" underline="true" value="${people.postCode}"/>

        </div>

        <div class="col-sm-6">
         <#input id="name" name="姓名" underline="true" value="${people.name}" span="true"/>
         <#select id="sex" name="性别" underline="true">
           @for(sex in GBSex){
           <option value="${sex.code}" ${sex.code==people.sex?'selected':""}>${sex.cname}</option>
            @}
         </#select>
             <#input id="papersNumber" name="证件号码" underline="true"  value="${people.papersNumber}"/>
         <#select id="nationCode" name="民族" underline="true">
           <option value="">请选择</option>
            @for(nation in GBNation){
            <option value="${nation.code}" ${nation.code==people.nationCode?'selected':""}>${nation.cname}</option>
              @}
           </#select>
       <#input id="familyAddress" name="家庭地址" underline="true"  value="${people.familyAddress}"/>
         <#input id="email" name="电子邮箱" underline="true" value="${people.email}"/>

        <#avatar id="avatar" storageUrl="${storageUrl}"  name="用户头像" avatarImg="${people.photo}" underline="true"/>
               </div>
          </div>

<div class="row btn-group-m-t">
    <div class="col-sm-10" style="text-align: center">
        <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="PtPeopleInfoDlg.editSubmit()"/>
        <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="PtPeopleInfoDlg.close()"/>
    </div>
</div>
</div>

</div>
</div>
<script src="${ctxPath}/static/modular/system/ptPeople/ptPeople_info.js"></script>
<script>

    laydate.render({
        elem: '#birthday'
    });
    $(function() {
        $(".selectpicker").selectpicker({
            noneSelectedText: '请点击显示' //默认显示内容  
        });
    })
    //绑定bootstrap-select事件
    $(".selectpicker").on('shown.bs.select',function(e){
        initStulist();
    });
    function initStulist() {
        $.ajax({
            type: "post",
            url:Feng.ctxPath+'/ptPeople/suggestStudentList',
            data:{'orgId':$("#orgId").val(),"classId":$("#classId").val()},
            async:false,
            dataType: "json",
            success: function(data){
                var studentList = data;
                if (studentList.length>0) {
                    var studentNameStr ='<option value=""></option>';
                    for (var i = 0; i < studentList.length; i++) {
                        studentNameStr += "<option value='" +studentList[i].userId + "' ";
                        studentNameStr += ">" + studentList[i].userName + "</option>";
                    }
                    $("#studentId").html(studentNameStr);
                    //必须加，刷新select
                    $("#studentId").selectpicker('refresh');
                }
            }
        });

    }
</script>
@}
